Skip to content

Conversation

gillyb
Copy link

@gillyb gillyb commented Jun 19, 2025

This example was causing my lsp not to be attached to some files.
Not sure why, but after trying a lot of different things I realized I can remap the keys in the init configuration and it still works properly.

@laurensdc
Copy link

I'm not sure if this is related, but I could not change existing keybinds, I had to use an autocommand like this

local group = vim.api.nvim_create_augroup("CoredusKLspKeymaps", { clear = true })
vim.api.nvim_create_autocmd("LspAttach", {
  group = group,
  callback = function()
    local Keys = require("lazyvim.plugins.lsp.keymaps").get()

    Keys[#Keys + 1] = {
      "<leader>ss",
      function()
        Snacks.picker.lsp_workspace_symbols()
      end,
      desc = "LSP Workspace Symbols",
      has = "documentSymbol",
    }

    Keys[#Keys + 1] = {
      "<leader>sS",
      function()
        Snacks.picker.lsp_symbols()
      end,
      desc = "LSP Symbols",
      has = "workspace/symbols",
    }
  end,
})

do you think it's worth submitting a PR for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants